package org.jsola.hr.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.jsola.core.vo.BaseTreeVO;
import org.jsola.core.vo.BaseVO;
import org.jsola.permission.vo.GroupVO;

import java.util.Date;
import java.util.List;

import static org.jsola.core.example.BaseExample.*;
import static org.jsola.core.example.BaseExample.E_GMT_CREATE;
import static org.jsola.core.example.BaseExample.E_GMT_MODIFIED;
import static org.jsola.core.example.BaseExample.E_ID;
import static org.jsola.core.example.BaseExample.N_GMT_CREATE;
import static org.jsola.core.example.BaseExample.N_GMT_MODIFIED;
import static org.jsola.core.example.BaseExample.N_ID;
import static org.jsola.hr.example.ChildCompanyExample.E_ADDRESS;
import static org.jsola.hr.example.ChildCompanyExample.*;
import static org.jsola.hr.example.ChildCompanyExample.E_LEVEL;
import static org.jsola.hr.example.ChildCompanyExample.E_PARENT_ID;
import static org.jsola.hr.example.ChildCompanyExample.E_SORT;
import static org.jsola.hr.example.ChildCompanyExample.N_LEVEL;
import static org.jsola.hr.example.ChildCompanyExample.N_PARENT_ID;
import static org.jsola.hr.example.ChildCompanyExample.N_SORT;

/**
 * 用工单位分组
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "【用工单位分组】详情展示对象")
@Data
public class ChildCompanyVO extends BaseTreeVO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_ID, example = E_ID)
    private String id;

    @ApiModelProperty(notes = N_NAME, example = E_NAME)
    private String name;

    @ApiModelProperty(notes = N_ADDRESS, example = E_ADDRESS)
    private String address;

    @ApiModelProperty(notes = N_PARENT_ID, example = E_PARENT_ID)
    private String parentId;

    @ApiModelProperty(notes = N_SORT, example = E_SORT)
    private Long sort;

    @ApiModelProperty(notes = N_LEVEL, example = E_LEVEL)
    private Integer level;

    @ApiModelProperty(notes = N_GMT_CREATE, example = E_GMT_CREATE)
    private Date gmtCreate;

    @ApiModelProperty(notes = N_GMT_MODIFIED, example = E_GMT_MODIFIED)
    private Date gmtModified;

    @ApiModelProperty(notes = "子公司组信息")
    private GroupVO groupVO;

    @ApiModelProperty(notes = "是否分管全部用工单位")
    private Boolean isAllCompany;

    @ApiModelProperty(notes = "公司分管地区")
    private List<GroupCityListVO> groupCityList;

    @ApiModelProperty(notes = "公司分管单位")
    private List<CompanyVO> companyList;

    @ApiModelProperty(notes = "所有公司管理员")
    private List<HrUserVO> adminUserList;

    @ApiModelProperty(notes = "是否分管全部的地区,true:是,false:否")
    private Boolean isAllCity;

    @ApiModelProperty(notes = "子公司信息")
    private ChildCompanyVO childCompanyVO;

    @ApiModelProperty(notes = "分管用工单位信息")
    private String companyStr;

    private Boolean edit;

    @ApiModelProperty(notes = "是否拥有权限")
    private Boolean hasPermission;
}

